package cn.scut.openfeign.client;

import cn.scut.openfeign.utils.Model;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "postservice")
public interface PostClient {
    //获取某个用户自己已发布过的帖子
    @GetMapping("/post/info/download")
    Model apiDownload(@RequestBody JSONObject jsonObject);

    //获取数据库中的所有帖子
    @GetMapping("/post/info/getAll")
    Model apiGetAllPost();

    @PostMapping("/post/collect/users")
    Model apiGetUserCollect(@RequestBody JSONObject jsonObject);
}
